<?
//ConfigurationBO::getValue("key");

class ConfigurationBO extends BusinessObject
{
  /* private function using in constructors */
  function setAttributes(){
	$this->fields	= array(
    		'id'		 => 'configurationID',    		     		
    		'title'	 => 'configurationTitle',
    		'key'	   => 'configurationKey',
        'value'  => 'configurationValue',
        'descr'  => 'configurationDescr'         
        );        
    BusinessObject::setAttributes();
  }
  
  /* constructor */
  function ConfigurationBO(){
    /** super(tableName) */
    BusinessObject::BusinessObject("configuration");
    $this->setAttributes();
  }
  
  function getValue($key)
  {
     $config = new ConfigurationBO(); 
     $config->key = $key;
     $config->Load(0,1);
     if($config->Next())
     {
        return $config->value;
     }else
     {
        return "";
     }
  }
}
?>
